<style type="text/css">
    .ncap-form-default {
        padding: 10px 0;
        overflow: hidden;
    }
    .ncap-form-default dl.row, .ncap-form-all dd.opt {
        font-size: 0;
        color: #777;
        background-color: #FFF;
        padding: 12px 0;
        margin-top: -1px;
        border-style: solid;
        border-width: 1px 0;
        border-color: #F0F0F0;
        position: relative;
        z-index: 1;
    }
    .ncap-form-default dl.row:first-child, .ncap-form-all dd.opt:first-child {
        border-top-color: #FFF;
    }
    .ncap-form-default dt.tit, .ncap-form-default dd.opt {
        font-size: 12px;
        line-height: 24px;
        vertical-align: top;
        letter-spacing: normal;
        display: inline-block;
    }
    .ncap-form-default dt.tit, .ncap-form-default dd.opt {
        font-size: 12px;
        line-height: 24px;
        vertical-align: top;
        letter-spacing: normal;
        display: inline-block;
    }
    .ncap-form-default div.bot, .ncap-form-all div.bot {
        display: block;
        padding: 12px 0 10px 16%;
    }
    .ncap-form-default dt.tit {
        text-align: right;
        width: 14%;
        padding-right: 2%;
    }
    input[type="text"], input[type="password"] {
        line-height: 20px;
        white-space: nowrap;
        display: inline-block;
        height: 20px;
        overflow: hidden;
        cursor: text;
    }
    input[type="text"], input[type="password"], textarea, select{
        padding: 2px 4px;
        -moz-border-radius: 4px;
        -webkit-border-radius: 4px;
        border-radius: 4px;
        resize: none;
    }
    input[type="text"], input[type="password"], textarea, select {
        color: #333333;
        background-color: #FFF;
        border: solid 1px #D7D7D7;
    }
    body, td, input, textarea, select, button {
        color: #555;
        font-size: 12px;
        font-family: "Microsoft Yahei", "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif;
    }
    input, button, select, textarea {
        outline: none;
    }
</style>
<include file="Common:__head__"/>
<div class="permissions-tabs">
    <a class="role tabs-bg" href="{:U('Good/price',array('id'=>$id))}">商品管理 - 会员价</a>
</div>
<div class="permissions-content">
    <div class="permissions-le">
        <div class="message-set">
            <span class="hints">操作提示</span>
            <span class="hints-dec">{$g_name} 注意：商品的代理价格应该遵循从上到下越来越高的规则。</span>
        </div>
        <form action="{:U('Good/price')}" method="post" class="form-horizontal" id="category_form">
            <input name="id" type="hidden" value="{$id}">
            <div class="ncap-form-default">
                <dl class="row">
                    <dt class="tit">
                        <label>价格阶梯</label>
                    </dt>
                    <dd class="opt">
                        <notempty name="good_rank_price">
                            <volist name="good_rank_price" id="price">
                                <div class="alisth0" style="margin-bottom:10px;">
                                    <b style="color:#3aa8cf;">{$price['rank_name']}</b> 单件拿货价：
                                    <input type="text" class="amt_i_1" value="{$price['unit_amt']}" name="unit_amt[{$price['rank_id']}]" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" style="width:100px;">&nbsp;
                                    <b style="color:#3aa8cf;">{$price['rank_name']}</b> 整箱拿货价：
                                    <input type="text" class="amt_i_2" value="{$price['batch_amt']}" name="batch_amt[{$price['rank_id']}]" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" style="width: 100px;">
                                </div>
                            </volist><else />
                            <volist name="agent_rank" id="rank" key="k">
                                <div class="alisth0" style="margin-bottom:10px;">
                                    <b style="color:#3aa8cf;">{$rank['rank_name']}</b> 单件拿货价：
                                    <input type="text" class="amt_i_1" name="unit_amt[{$rank['rank_id']}]"  onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" style="width:100px;">&nbsp;
                                    <b style="color:#3aa8cf;">{$rank['rank_name']}</b> 整箱拿货价：
                                    <input type="text" class="amt_i_2" name="batch_amt[{$rank['rank_id']}]" onkeyup="this.value=this.value.replace(/[^\d.]/g,'')" style="width: 100px;">
                                </div>
                            </volist>
                        </notempty>
                    </dd>
                </dl>
                <div class="bot">
                    <a href="JavaScript:void(0);" class="btn btn-blue" id="submitBtn">确认提交</a>
                </div>
            </div>
        </form>
    </div>

    <div class="permissions-ri">
        <a href="" class="permissions-help">帮助和服务</a>
    </div>
</div>
<script>
    $(function() {
        //提交
        $("#submitBtn").click(function(){
            //$price_len = $(".amt_i").length;
            $price_len = $('input').length;
            for($i = 0;$i < $price_len;$i ++){
                if($("input").eq($i).val() == ""){
                    layer.alert("请填写完整价格！");return false;
                }
            }
            $("#category_form").submit();
        });

    });
</script>
<include file="common:__foot__"/>
